package com.asifrc.tw101;

/**
 * Created by asifrc on 2/11/14.
 */
public class FizzBuzzExercise {
    public static void main(String[] args) {
        FizzBuzzExercise exercise = new FizzBuzzExercise();
        exercise.FizzBuzz(100);
    }

    private void FizzBuzz(int i) {
        for (int x = 1; x <= i; x++) {
            String line = "";
            line += ((x % 3) == 0) ? "Fizz" : "";
            line += ((x % 5) == 0) ? "Buzz" : "";
            line = (line.equals("")) ? String.valueOf(x) : line;
            System.out.println(line);
        }
    }
}
